package com.school.appleforgetbackend.service;


import com.school.appleforgetbackend.BO.entity.Weld4;
import com.school.appleforgetbackend.BO.entity.Weld5;
import com.school.appleforgetbackend.BO.response.*;
import com.school.appleforgetbackend.BO.thirdWeld.ThirdWeld;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;

// 添加FastJSON导入


@Service
@ConditionalOnProperty(prefix = "mock.service", name = "user", havingValue = "true")
public class MockWeldService implements WeldService {


    @Override
    public WeldResponse getWeld() {
        WeldResponse weldResponse = new WeldResponse();
        //焊机1

        weldResponse.setWeld("1号焊机");
        weldResponse.setTimestamp("2025-42-04 12:42:00");
        weldResponse.setCurrent("12.3");
        weldResponse.setVoltage("45.3");
        System.out.println("Original Response"+"...."+weldResponse);
        return weldResponse;
    }

    @Override
    public WeldResponse getWeld2() {
        WeldResponse weldResponse = new WeldResponse();
        //焊机2

        weldResponse.setWeld("2号焊机");
        weldResponse.setTimestamp("2025-42-04 12:42:00");
        weldResponse.setCurrent("0");
        weldResponse.setVoltage("0");
        System.out.println("Original Response"+"...."+weldResponse);
        return weldResponse;
    }

    @Override
    public WeldResponse getWeld4() {
        WeldResponse weldResponse = new WeldResponse();
        //焊机4
        weldResponse.setWeld("4号焊机");
        weldResponse.setTimestamp("2025-42-04 12:42:00");
        weldResponse.setCurrent("0");
        weldResponse.setVoltage("0");
        System.out.println("Original Response"+"...."+weldResponse);
        return weldResponse;
    }

    @Override
    public WeldResponse getWeld5() {
        WeldResponse weldResponse;
        //焊机5
        weldResponse = null;
        System.out.println("Original Response"+"...."+weldResponse);
        return weldResponse;
    }

}

